import request from '@/utils/request'

const API_NAME = '/admin/user/orders'

export default {
  // 获取所有订单
  queryAll() {
    return request({
      url: `${API_NAME}/`,
      method: 'get'
    })
  },
  // 分页获取所有订单
  queryByPage(page, limit, searchObj) {
    return request({
      url: `${API_NAME}/${page}/${limit}`,
      method: 'get',
      params: searchObj
    })
  },
  // 导出订单
  output(list) {
    return request({
      url: `${API_NAME}/output`,
      method: 'post',
      data: list
    })
  },
  // 获取销量
  count(){
    return request({
      url: `${API_NAME}/count`,
      method: 'get'
    })
  }
}
